import service from "@/utils/request";

// get 是params传递参数   
// post 是data传递参数
// 用户列表
export const UserListApi = (params) => {
    return service({
        url: "/admin/user/list",
        method: "get",
        params
    })
}

// 登录
export const UserLoginApi = (data) => {
    return service({
        url: "/admin/user/login",
        method: "post",
        data
    })
}

// 添加用户
export const UserAddApi = (data) => {
    return service({
        url: "/admin/user/add",
        method: "post",
        data
    })
}

// 根据用户uid查询用户数据
export const UserInfoApi = (params) => {
    return service({
        url: "/admin/user/getuser",
        method: "get",
        params
    })
}

// 修改用户
export const UserEditApi = (data) => {
    return service({
        url: "/admin/user/edit",
        method: "put",
        data
    })
}


// 删除用户
export const UserDeleApi = (data) => {
    return service({
        url: "/admin/user/dele",
        method: "delete",
        data
    })
}

// 根据用户名模糊查询
export const UserSearchApi = (params) => {
    return service({
        url: "/admin/user/search",
        method: "get",
        params
    })
}